package com.sanhuo.security.service;

import com.sanhuo.security.dao.PermitMapper;
import com.sanhuo.security.entity.Permit;
import com.sanhuo.triild.Basic.BaseMapper;
import com.sanhuo.triild.Basic.BaseService;
import com.sanhuo.triild.annotation.MapperWire;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class PermitService extends BaseService<Permit> {
    @MapperWire
    private PermitMapper permitMapper;

    @Override
    public BaseMapper<Permit> getBaseMapper() {
        return permitMapper;
    }

    public List<String> findByRole(String roleId) {
        return permitMapper.findByRole(roleId);
    }
}
